package com.xxl.job.executor.sample.frameless.test.singleton;

import java.util.Date;

//饿汉模式
public class HungrySingleton {
    private final String time;
    private static final HungrySingleton singleton = new HungrySingleton((new Date()).toString());
    private HungrySingleton(String time) {
        this.time = time;
    }

    public String getTime() {
        return time;
    }

    public static HungrySingleton getInstance() {
        return singleton;
    }
}
